
package com.knowledgebooks.nlp;
	import java.awt.BorderLayout;
	import java.awt.Button;
	import java.awt.Checkbox;
	import java.awt.CheckboxGroup;
	import java.awt.Color;
	import java.awt.Dimension;
	import java.awt.Event;
	import java.awt.Font;
	import java.awt.Graphics;
	import java.awt.GridBagConstraints;
	import java.awt.GridBagLayout;
	import java.awt.Insets;
	import java.awt.Label;
	import java.awt.List;
	import java.awt.Panel;
	import java.awt.TextField;
/*==============================================================================
	class      ClrPanel [Rajesh Unnikrishnan]
	Content:   Panel with Color Bar (for selecting starting color)

	===============================================================================*/
	class ClrPanel extends Panel {
		public GlobalVariables globlvar;         /* GlobalVariables */
		Color aColors[];

		/* constructor */
		public ClrPanel(Color aClrArray[]) {

			aColors = aClrArray;
			
		}

		public void paint(Graphics g) {
			boolean b;
			Dimension pnldim;
			int i;
			int clrBarWd;
			int startingx;
			
			pnldim = this.size();

			clrBarWd = (pnldim.width - (25+80))/globlvar.MAXCOLORS;
			
			
			for (startingx=25,i=0;i<globlvar.MAXCOLORS;i++,startingx+=(clrBarWd+1)) {
				g.setColor(aColors[i]);
				g.drawLine(startingx,0,startingx+clrBarWd,0);
				g.drawLine(startingx,1,startingx+clrBarWd,1);
			}
		}


		public Insets insets() {
			/* create border around outside of panel */
			return new Insets(1,1,1,1);
		}
	}


